package com.baojiaren.controller;

import com.baojiaren.pojo.Order;
import com.baojiaren.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ✎ℳ๓₯㎕.倾心❀、
 * @create 2021-07-15-11:07
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService service;

    /**
     * 根据主键查询订单
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public Order selectOderById(@PathVariable("id") Integer id){

        return service.selectOrderById(id);
    }
}
